package com.pb.wkflow.api.mapper;

import com.pb.wkflow.api.entity.MyApplyTaskEntity;
import com.pb.wkflow.api.entity.TaskCountEntity;
import com.pb.wkflow.api.query.MyApplyTaskQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 苗益辉
 * @date 2022/9/29 10:43
 */
@Mapper
@Repository
public interface MyApplyTaskMapper {

    /**
     * 分页查询我的申请
     * @param myApplyTaskQuery 查询条件
     * @return List<MyApplyTaskEntity>
     */
    List<MyApplyTaskEntity> findMyApplyList(MyApplyTaskQuery myApplyTaskQuery);

    /**
     * 查询我的申请总数
     * @param myApplyTaskQuery 查询条件
     * @return long
     */
    long findMyApplyListCount(MyApplyTaskQuery myApplyTaskQuery);

    /**
     * 查询各流程键值对应的待办数量
     * @param query query
     * @return List<TaskCountEntity>
     */
    List<TaskCountEntity> countProcDefKey(MyApplyTaskQuery query);
}
